import argparse


def parse_argument():
    parser = argparse.ArgumentParser(description="获取最简分数")
    parser.add_argument('--dx', type=int)
    parser.add_argument('--dy', type=int)
    parser.add_argument('--scale', type=int)
    return parser.parse_args()


def main():
    args = parse_argument()
    dx = args.dx
    dy = args.dy
    scale = args.scale
    for i in range(2, 1000):
        while dx % i == 0 and dy % i == 0:
            dx = dx / i
            dy = dy / i

    print(f"恭喜你获得的最简分数是{int(dx)} / {int(dy)}")
    print(f"恭喜你获得的放大倍数是{int(dx) * scale} / {int(dy * scale)}")


if __name__ == "__main__":
    main()
